import { apiRequest as request } from '@/utils/axios';
import type { ApiFuncData, StaffSetting, STAFF_SETTING_VAL_TYPE } from './types';

export interface StaffSettingQuery {
  is_simple: '1';
}

export interface StaffSettingReqData {
  desc: string;
  title: string;
  val_type: STAFF_SETTING_VAL_TYPE;
  status: boolean;
  is_required: boolean;
}

export function staffSetting(data: ApiFuncData<StaffSettingReqData, StaffSettingQuery>) {
  return request<StaffSetting[], StaffSettingReqData>({
    url: '/v7/staff-setting',
    method: 'get',
    ...data,
  });
}
